package com.qut.servlet;

import java.io.IOException;
import java.util.List;
import java.util.Map;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.qut.service.controller_list_Service;

/**
 * Servlet implementation class controller_list_by_flyman_id_desc_Servlet
 */
@WebServlet("/controller_list_by_flyman_id_desc_Servlet")
public class controller_list_by_flyman_id_desc_Servlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
       
    /**
     * @see HttpServlet#HttpServlet()
     */
    public controller_list_by_flyman_id_desc_Servlet() {
        super();
        // TODO Auto-generated constructor stub
    }

	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		controller_list_Service controller_list_Service=new controller_list_Service();
		List<Map<String, Object>> list=
				controller_list_Service.controller_list_by_flyman_id_desc();
		
		HttpSession session=request.getSession();
		session.setAttribute("item", list);
		session.setAttribute("item_intime","0");
		session.setAttribute("item_outtime","0");
		session.setAttribute("flyman_id","0");
		response.sendRedirect("controller.jsp");
	}

	/**
	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		doGet(request, response);
	}

}
